import query from '@dfeidao/atom-nodejs/db/query';
// import { IBaseTable } from '@feidao/web/atom/nodejs/db/interfaces';

interface Message {
	filter: {
		tablename: string;
		productid: string;
	};
}

// 查询数据(模型定义)
export default async function atom(msg: Message, action_id: string, session_id: string) {
	const systemid = '11';
	const { exec, prepare } = query(action_id, session_id, systemid);
	prepare('base_data_struct', ['file_cont'], msg.filter, 200, 1, [], []);
	const [data] = await exec();

	// const c = count(action_id, session_id, spaceid, systemid);

	return { dataArray: data };
}
